package models

import (
	"github.com/zeromicro/go-zero/core/stores/cache"
	"github.com/zeromicro/go-zero/core/stores/sqlx"
)

var _ ChapterModel = (*customChapterModel)(nil)

type (
	// ChapterModel is an interface to be customized, add more methods here,
	// and implement the added methods in customChapterModel.
	ChapterModel interface {
		chapterModel
	}

	customChapterModel struct {
		*defaultChapterModel
	}
)

// NewChapterModel returns a model for the database table.
func NewChapterModel(conn sqlx.SqlConn, c cache.CacheConf, opts ...cache.Option) ChapterModel {
	return &customChapterModel{
		defaultChapterModel: newChapterModel(conn, c, opts...),
	}
}
